<?php
/**
 * Created by PhpStorm.
 * User: jksen
 * Date: 2018/1/19
 * Time: 下午12:18
 */

namespace app\admin\controller\v1;


class FuncClass
{

    public function addFunc()
    {
        $model = model('\app\common\model\FuncClass');
        $model->func_name = '帮我买';
        $model->modules = json_encode([1,2]);
        $model->status = '1';
        $model->create_time = date('Y-m-d H:i:s',time());
        $model->create_uid = '1';
        if($model->save()){
            echo $model->getLastInsID();
        }
        pr($model->getError());
    }
}